package no13.string;
/**
 * Format功能演示
 * @author gao
 *
 */
public class SimpleFormat {
	public static void main(String[] args) {
		int x =5;
		double y = 5.111112222;
		System.out.println("Row 1:["+x+" "+y+"]");
		//格式化输出
		System.out.format("Row 1:[%d %f]\n", x,y);
		//printf 调用format   一模一样的两个方法,为配合C的写法
		System.out.printf("Row 1:[%d %f]\n", x,y);
		
		System.out.println(y);
		System.out.printf("%d %c %b %s %f %e %x %h %%\n",1,'c',true,"a",1.2,1.5112,100,11);
		System.out.println(String.format("%b", true));
		
	}
}
